{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Plot Interaction of Categorical Factors"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In this example, we will visualize the interaction between categorical factors. First, we will create some categorical data. Then, we will plot it using the interaction_plot function, which internally re-codes the x-factor categories to integers."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "%matplotlib inline\n",
    "\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import pandas as pd\n",
    "from statsmodels.graphics.factorplots import interaction_plot"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "np.random.seed(12345)\n",
    "weight = pd.Series(np.repeat(['low', 'hi', 'low', 'hi'], 15), name='weight')\n",
    "nutrition = pd.Series(np.repeat(['lo_carb', 'hi_carb'], 30), name='nutrition')\n",
    "days = np.log(np.random.randint(1, 30, size=60))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAFzCAYAAAAzNA41AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzt3Xl8VdW9/vHPF0hAEBEQES8qDtQBqhaDQtUMzCiIIioWRcChtlWv9VcVRRRBkVoFR6gIxAnF4eIso0DAWqo4UceLtmJRBFSuE0JQ1++PlSCGDDvJ2VlneN6vV15JDvuc80B0P1l7WMucc4iISOaqFzqAiIiEpSIQEclwKgIRkQynIhARyXAqAhGRDKciEBHJcCoCEZEMpyIQEclwKgIRkQynIhARyXANQgeIYrfddnPt2rULHUNEJKW88sornznnWlW1XUoUQbt27VixYkXoGCIiKcXMVkfZToeGREQynIpARCTDqQhERDJcSpwjEBEB2Lp1K2vWrGHz5s2hoySVRo0a0bZtW7Kysmr0fBWBiKSMNWvW0LRpU9q1a4eZhY6TFJxzfP7556xZs4Z99923Rq+hQ0MikjI2b95My5YtVQLbMTNatmxZq1GSikBEUopKYEe1/TdREYiIlHj99dd5/fXXI2178cUXR3pu2e2SkYpARKREdYrglltuifTcstslI50sFpG0N2bMGLZu3cqyZcv46quv6NKlC4MHDyY/P5977rkHgPfee4/HH38cgPvvv5/nn38egPz8fDp37szKlSuZN2/ettfMz89nyZIlAFxxxRXlPrfsdlu2bGHYsGF88skntG3blsLCQsaPH/+zbHPnzmWPPfaI+V/k5zQiEJGM8P7777N06VIGDhzIokWLdvjzG264gZEjRzJy5Mif7ciXL19O165df1YCUZ9b1t13303Hjh0pKiqiffv2zJgxI1K2uKkIRCQjDB06FIC9996b4uLibY9/9913lT6vY8eODBw4MCEZ3n77bY466igAunTpwjvvvFNptrqiIhCRjNCkSZNtX5933nls2LABgLlz5257fKeddmLTpk2Avz4fYOedd470+uU9t6wOHTqwfPlywI80OnTosEO2EFQEIpJxdtllF26//XbOP/98WrZsue3xnj17Mnv2bI4++miWLVtWrdeM8txzzjmHt956i9zcXFatWsWwYcNq89dIGKuouZJJTk6O0zTUIvLOO+9w8MEHh46RlMr7tzGzV5xzOVU9VyMCEZEMpyIQkfS2eDG0a+c/S7lUBCKSvhYvhn79YPVq/1llUC4VgYikp9ISKLmSh02bVAYVUBGISPopWwKlVAblUhGUsXYt5OXBp5+GTiIiNVJRCZRSGexARVDGuHHwwgv+s4ikmKpKoFQNy2DMmDHb5g3aXpwzjFb0nomkSee2s3YtFBbCjz/6z6NHQx3P/SQiUV18MWw/2+fGjfDmm/5/4Cg2bYIePaBjR2je3D92+OFQg9lCU2GG0cpoRLCdceN++m/ohx80KhBJKe+9F70ESv34o39eNSxYsIDc3FwOP/xwPi05hpyfn1/pczZv3sz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KSNc4E3nXN5wCr8Wu7/AnoDLwG9gFfDxVMRbO++ks8fAdkhg4hIWjkE+EfJ18uBg/E7/lOBZ4FTgFfCRPNUBD/5NnQAEUlLbwFdSr7uUvL9a/gjDwvxIwONCERE0tg0oIOZLQXaA/fgd/yr8YeI1jvn6nJSzR3ohjIRkQynEYGISIZTEYiIZDgVgYhIhlMRiIhkOBWBSDVVNQdVJXNXHW5mh8cWTKSGVAQi1VSLOagOL/kQSSq6fFQEv5YscBzwT/zOeibwBbA78E/n3B+223aJcy6/5Oud8NOStAA+AN7E35meBRwL7AL0Af4bOKnkJT52znWP/28lEo1GBCJe2blfjsTPD5MLtDGzQyt43kHAGuAY/HxV40se/9ncVc65K4AJwASVgCQbFYGIV3bul/8AJ5XMQLsf8F8VPO9j4AhgKXDrdo9r7ipJGSoCEa/s3C+zgFtKDgFdhd+hl6cPMM4519U5N3O7x8ubu+o7oDGAmVmCcovUmopAxPvZ3C/ATUDfkvlhzsePEMrzGnC7mS0ys1lm1rGS91gADDSzv+HPH4gkBZ0sFqkFMzsXOB3YWvJxk3NuSdBQItWkIhARyXA6NCQikuFUBCIiGU5FICKS4VQEIiIZTkUgIpLhVAQiIhnu/wN7AqpIA69iLQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x432 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig, ax = plt.subplots(figsize=(6, 6))\n",
    "fig = interaction_plot(x=weight, trace=nutrition, response=days, \n",
    "                       colors=['red', 'blue'], markers=['D', '^'], ms=10, ax=ax)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
